// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import qs from	'qs'
import ElementUI from 'element-ui'
import Vuex from 'vuex'
Vue.use(Vuex)
import 'element-ui/lib/theme-chalk/index.css'
import '../static/css/common.css'
import '../static/css/iconfont.css'


import { get, post ,login} from './request/http'
import { common} from './request/utils'
console.log(common);
import Router from 'vue-router'
Vue.use(ElementUI)

Vue.config.productionTip = false;
//import qs from	'qs'
Vue.prototype.$qs= qs;
Vue.prototype.$common= common;
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

// 导入global.js

import global from '@/globalComponents/global.js'
// 使用全局组件
Vue.use(global)
/* Vue.use(qs) */
/* 设置全局变量 */
import global_ from './base.vue'
Vue.prototype.global_ = global_;
axios.defaults.baseURL=global_.baseurl;
console.log(global_.baseurl);

sessionStorage.setItem('baseurl',JSON.stringify(global_.baseurl));
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
